<template>
  <div>
    666
    <el-button @click="btn">点击</el-button>
  </div>
</template>

<script>
import axios from 'axios'

export default {
  data () {
    return {}
  },
  methods: {
    btn () {
      axios
        .get('http://localhost:8000/api')
        .then(function (response) {
          console.log(response.data) // 这里是接口返回的数据
        })
        .catch(function (error) {
          console.log(error)
        })
    }
  }
}
</script>

<style></style>
